Configuration | Default Value | Description |
awesomeUploaderRoot | "" | Path to all awesomeuploader resources. This is added to beginning of the path of all resources. |
maxFileSizeBytes | 3145728 (3 MiB) | Maximum file size in bytes |
autoStartUpload | false | Auto start uploads as soon as a file is seleted. |
alwaysShowFullFilePath | false | If full file path is available, do not strip out the path. e.g. If file selected is "C:\FileToUpload.jpg" file name will be "FielToUpload.jpg" |
supressPopups | false | Do not show built-in Awesome Uploader popups like "This file is too big" or "Error uploading file". |
allowDragAndDropAnywhere | false | Allows dropping files anywhere onto the page. |
extraPostData | { } | Object of additional post data to send along with upload |
NOTE: For drag and drop uploads, extraPostData only works in Firefox 3.6+, Chrome 6+. WHY? multipart/form-data uploads (required to add additional parameters) requires the File API, which is only supported by Firefox 3.6+ & Chrome 6+. | ||
xhrSendMultiPartFormData | false | Send multipart/form-data uploads for drag and drop rather than sending the file as the entire request body. Only Firefox 3.6 compatible. See above note. |
xhrFilePostName | "Filedata" | Name of post parameter for drag and drop file upload. Only used if xhrSendMultiPartFormData=true. See above note. |
disableFlash | 22 | Disable flash based uploader (swfupload) |
flashButtonHeight | 22 | Height of flash button |
flashButtonWidth | 56 | Width of flash button |
flashButtonSprite | awesomeUploaderRoot + "swfupload_browse_button_trans_56x22.PNG" | Sprite used for flash button, contains 4 sections for normal, over, pressed, & disabled |
flashUploadFilePostName | "Filedata" | POST variable name for flash name |
flashSwfUploadPath | awesomeUploaderRoot + "swfupload.swf" | path to swfupload.swf file |
flashSwfUploadFileTypes | "*.*" | File name mask for file types allowed by swfupload |
flashSwfUploadFileTypesDescription | "All Files" | Description of above mask |
flashUploadUrl | awesomeUploaderRoot + "upload.php" | URL that swfupload should send file to |
gridWidth | 420 | grid width of file list |
gridHeight | 200 | grid height of file list |
standardUploadFilePostName | "Filedata" | POST variable name for standard uploader |
standardUploadUrl | awesomeUploaderRoot + "upload.php" | URL that stanard file upload should send file to |
standardButtonText | "Browse..." | URL that stanard file upload should send file to |
xhrFileNameHeader | "X-File-Name" | Header name used to send file name for drag and drop (XHR2) upload |
xhrExtraPostDataPrefix | "extraPostData_" | Header name used to send file name for drag and drop (XHR2) upload |
xhrUploadUrl | awesomeUploaderRoot + "xhrupload.php" | URL that drag and drop (XHR2) upload should send file to |
fileselected | A file is selected. Returns file object. Return false to prevent this file from being queued. |
Parameters: Object awesomeUploaderInstance, Object file file will at minimum be: file = { name: fileName ,method: "swfupload" //(can be "swfupload", "standard", "dnd" ,id: 1 // a unique identifier to abort or remove an individual file, incrementing int ,status: "queued" // file status. will always be queued at this point // if swfupload or dnd or standard upload on a modern browser (supports the FILE API) is used, size property will be set: ,size: 12345 // file size in bytes } Return false to prevent file from being queued! | |
fileselectionerror | A file was selected that is larger than the maxiumum allowed |
Parameters: Object awesomeUploaderInstance, Object file | |
uploadstart | Uploading has started |
Parameters: Object awesomeUploaderInstance, Object file | |
uploadprogress | For Flash + Drag and Drop uploads only! As the file is uploaded, progres events will come in for each file. |
Parameters: Object awesomeUploaderInstance, Int fileId, bytesComplete, bytesTotal fileId will match the id from the file object in the uploadstart event | |
uploadcomplete | A file has finished uploading. Process the server result to see if it was successful. Return false if unsuccessful. |
Parameters: Object awesomeUploaderInstance, Object file, String serverData, Object resultObject serverData will contain the server response. Process it at this event to detemine if the upload was successful. If the upload filed, return false here. You can also set resultObject.error to a descriptive error that will be passed to the uploaderror event. | |
uploadremoved | A file has been removed from the upload queue |
Parameters: Object awesomeUploaderInstance, Object file | |
uploadaborted | A file upload has been aborted while uploading |
Parameters: Object awesomeUploaderInstance, Object file | |
uploaderror | An error has occurred when upoading the file. Also fires when you return false from the uploadcomplete event |
Parameters: Object awesomeUploaderInstance, Object file, Object resultObject resultObject.error will contain the text you set in the uploadcomplete event |